package com.ia.aistream.model.dxfcomponent.entity;

import java.util.Objects;

/**
 * 提取dxf文件中的数据保存位置
 * @author ymj
 */
public class FileComponent {
    /** 封装原始数据 */
    private String original;
    /** 封装X轴坐标 */
    private Double x;
    /** 封装Y轴坐标 */
    private Double y;
    /** 封装文字样式 */
    private String style;
    /** 封装数据所在的图层 */
    private String layer;

    public String getLayer() {
        return layer;
    }

    public void setLayer(String layer) {
        this.layer = layer;
    }

    public String getOriginal() {
        return original;
    }

    public void setOriginal(String original) {
        this.original = original;
    }

    public Double getX() {
        return x;
    }

    public void setX(Double x) {
        this.x = x;
    }

    public Double getY() {
        return y;
    }

    public void setY(Double y) {
        this.y = y;
    }

    public String getStyle() {
        return style;
    }

    public void setStyle(String style) {
        this.style = style;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FileComponent that = (FileComponent) o;
        return original.equals(that.original) &&
                x.equals(that.x) &&
                y.equals(that.y) &&
                layer.equals(that.layer);
    }

    @Override
    public int hashCode() {
        return Objects.hash(original, x, y, style, layer);
    }

    @Override
    public String toString() {
        return "FileComponent{" +
                "original='" + original + '\'' +
                ", x=" + x +
                ", y=" + y +
                ", style='" + style + '\'' +
                ", layer='" + layer + '\'' +
                '}';
    }
}
